﻿<UserControl x:Class="ClickToEditTextBlock.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Controls="clr-namespace:ClickToEditTextBlock.Controls" mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400"
	DataContext="{Binding RelativeSource={RelativeSource Self}}">

    <Grid x:Name="LayoutRoot" Background="White" Margin="10">
		<StackPanel>
			<Controls:ClickToEditTextBlock Text="{Binding Text1, Mode=TwoWay}"/>
			<Controls:ClickToEditTextBlock Text="{Binding Text2, Mode=TwoWay}"/>
			<Controls:ClickToEditTextBlock Text="{Binding Text3, Mode=TwoWay}"/>
		</StackPanel>
		
		<!-- Invisible TextBox to take focus when page is clicked -->
		<TextBox x:Name="FocusTextBox" Width="0" Height="0"/>
    </Grid>
</UserControl>
